from fastapi import FastAPI
from pydantic import BaseModel
from server.agent import agent

app = FastAPI()

class AgentRequest(BaseModel):
    query: str
    
@app.post("/agent")
async def ask_agent(req: AgentRequest):
    response = agent.run(req.query)
    return {"response": response}

